package com.drop.dao;

import com.drop.entity.Order;

import java.util.List;

/**
 * Created by 陈东一 on 2017/9/24 15:18
 */
public interface OrderDao {

	/**
	 * 插入订单头
	 * @param userId
	 * @param sumMoney
	 * @param shipId
	 * @param time
	 * @param state
	 * @return
	 */
	public Boolean insertOrder(int userId, float sumMoney, int shipId, String time, int state) throws Exception;

	/**
	 * 插入订单详情
	 * @param orderId
	 * @param goodsId
	 * @param money
	 * @param num
	 * @return
	 * @throws Exception
	 */
	public Boolean insertChildOrder(int orderId, List<String> goodsId, List<Float> money, List<String> num) throws Exception;

	/**
	 * 根据用户时下单时间查询订单
	 * @param userId
	 * @param time
	 * @return
	 * @throws Exception
	 */
	public Order getOrder(int userId,String time) throws Exception;

	/**
	 * 修改订单状态
	 * @param id
	 * @param state
	 * @param address
	 * @return
	 * @throws Exception
	 */
	public Boolean updateState(int id,String state,String address) throws Exception;

	/**
	 * 批量修改
	 * @param ids
	 * @param state
	 * @return
	 * @throws Exception
	 */
	public Boolean updateState(String ids,int state) throws Exception;

}
